﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IntellectShop.Web2.ViewModels.ScheduleCreateViewModel>" %>
<%@ Import Namespace="IntellectShop.Web2.Code" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Html.Resource("CreateScheduleItem")%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

	<h1><%= Html.Resource("CourseDetails") %>:</h1>

	<%= Html.DisplayFor(model => Model.Course)%>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="FirstInfo" runat="server">

<script type="text/javascript" language="JavaScript">

	$(function () {
		$("#EventDate").datepicker({
			changeYear: true,
			changeMonth: true,
		});
	});

</script>
<div class="sidebaritem">
	<% using (Html.BeginForm())
	{%>
	<%= Html.ValidationSummary(true) %>

		<h2><%= Html.Resource("CreateScheduleItem")%>:</h2>

		<%= Html.HiddenFor(model => model.CourseID)%>

		<div class="editor-label">
			<%= Html.Resource("Schedule, EventDate")%>
		</div>
		<div class="editor-field">
			<%= Html.EditorFor(model => model.EventDate)%>
			<%= Html.ValidationMessageFor(model => model.EventDate)%>
		</div>

		<div class="editor-label">
			<%= Html.Resource("Schedule, DurationDays")%>
		</div>
		<div class="editor-field">
			<%= Html.EditorFor(model => model.DurationDays)%>
			<%= Html.ValidationMessageFor(model => model.DurationDays)%>
		</div>

		<div class="editor-label">
			<%= Html.Resource("Schedule, Note")%>
		</div>
		<div class="editor-field">
			<%= Html.TextAreaFor(model => model.Note, new { cols = 60, rows = 6 })%>
			<%= Html.ValidationMessageFor(model => model.Note)%>
		</div>
		<div class="spacer">&nbsp;</div>
		<div class="row">
			<span class="formlabel">
				<input type="submit" value="<%= Html.Encode(Html.Resource("Strings, Create"))%>" class="submit"/>
			</span>
			<span class="forminput">
			</span>
		</div>

	<% } %>
	<div>
		<%= Html.ActionLink(Html.Resource("Strings, BackToList"), "Details", "Course", new { id = Model.Course.CommodityID }, null)%>
	</div>
</div>
</asp:Content>